#ifndef BOOM_H_
#define BOOM_H_

#include "base/GLStructure.h"
#include "base/GLObject.h"
#include "base/Cube.h"
#include "base/ClosedCylinder.h"
#include "structure/Frame.h"
#include "listeners/KeyListener.h"

class Boom : public GLStructure, public KeyListener {
private:
	std::list<GLObject*> components;
	std::list<GLStructure*> structures;
	float sizeBottom;
	float sizeTop;
	float length;
	float cableHeight;
	float hookHeight;

	Cube* column1;
	Cube* column2;
	Cube* column3;
	Cube* column4;

	Frame* frame1;
	Frame* frame2;
	Frame* frame3;
	Frame* frame4;

	ClosedCylinder* cable;
	ClosedCylinder* hook;

	float boomRotationAngle;

	static const char boomUp;
	static const char boomDown;
	static const char cableUp;
	static const char cableDown;

	//! Called when a key is pressed on keyboard
	void OnKeyDown(int nKey, char cAscii);

public:
	Boom(GLuint programHandler, GLShaderConfig shaderConfig, float sizeBottom, float sizeTop, float length);
	~Boom();
	void updateComponents();
	void update (glm::mat4 viewMatrix, glm::mat4 modelMatrix);
};


#endif /* BOOM_H_ */
